import {axios} from '@/utils/request.js';

/**
 * 列表查询
 * @param data 传入参数
 * @returns {AxiosPromise}
 */
export function getList(data) {
    return axios({
        url: "/vatoutinv/vmsFullOutInvoice/page",
        method: 'post',
        data
    })
}
/**
 * 上传
 * @param data 传入参数
 * @returns {AxiosPromise}
 */
export function upload(data) {
    return axios({
        url: "/vatoutinv/vmsFullOutInvoice/uploadFphm",
        method: 'post',
        data
    })
}

/**
 * 下载pdf文件预览
 * @param param
 * @returns {*}
 */
export function downPdfFile(fphm) {
    return axios({
        url: "/vatoutinv/vmsFullOutInvoice/layoutFileReading?fphm=" + fphm,
        method: 'get',
        responseType: 'blob',
        headers: {'content-type': 'application/x-www-form-urlencoded'}
    })
}

/**
 * 获取发票详情
 * @param param
 * @returns {*}
 */
export function getInvoiceDetail(fphm) {
    return axios({
        url: "/vatoutinv/vmsFullOutInvoice/getInvoiceDetail?fphm=" + fphm,
        method: 'get'
    })
}